# Maintainer: Luca Weiss <luca@lucaweiss.eu>
pkgname=py3-ytmusicapi
pkgver=1.8.2
pkgrel=0
pkgdesc="Unofficial API for YouTube Music"
url="https://github.com/sigma67/ytmusicapi"
arch="noarch"
license="MIT"
depends="py3-setuptools py3-requests"
makedepends="py3-setuptools_scm py3-gpep517 py3-installer py3-wheel"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/y/ytmusicapi/ytmusicapi-$pkgver.tar.gz"
builddir="$srcdir/ytmusicapi-$pkgver"
options="!check" # tests require special auth setup

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/ytmusicapi-$pkgver-*.whl
}

sha512sums="
6396f1e245bc390251ca37fe896cf41bb0c5608608134a7d8cc07895aca35cb348e18fdd861b830d8efc4399d5931b82e489e734914f9b685606a2bd7af890ea  ytmusicapi-1.8.2.tar.gz
"
